package com.congiya.weather;

import java.util.HashMap;
import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;


public class WeatherRegionDAO extends SqlMapClientDaoSupport {

	
	public WeatherRegionVO getWeatherRegionVO(HashMap<String, String> map) {
		//return (WeatherRegionVO) getSqlMapClientTemplate().queryForObject("weather.getWeatherRegion", map);
		
		List<WeatherRegionVO> list = getSqlMapClientTemplate().queryForList("weather.getWeatherRegion", map);
		
		if(list != null && list.size() > 0)
			return (WeatherRegionVO) list.get(0);
		else
			return null;
	}
	
	public List getWeatherRegionList(HashMap<String, String> map) {
		return getSqlMapClientTemplate().queryForList("weather.getWeatherRegion", map);
	}

	
}
